package com.juc.threadpool;

import java.util.concurrent.*;

/**
 * @author mobai
 * @since 2021/3/3 11:20
 */
public class CustomThreadPoolTest {

    public static void main(String[] args) {
        ThreadPoolExecutor threadPoolExecutor=new ThreadPoolExecutor(10, 100, 30, TimeUnit.SECONDS, new ArrayBlockingQueue<>(10),new ThreadPoolExecutor.AbortPolicy());
        for (int i = 0; i < Integer.MAX_VALUE; i++) {
            threadPoolExecutor.execute(new FixedThreadPoolTest.Task());
        }

    }
}
